package com.mygame.common.utils;

import java.io.File;

public class PathUtil {

    public static String getBasePath(){
        String configPath = null;
        String os = System.getProperty("os.name");
        if (os != null && os.toLowerCase().startsWith("windows")) {
            configPath = System.getProperty("user.dir");
        } else if (os != null && os.toLowerCase().startsWith("linux")) {
            configPath = System.getProperty("user.dir");
        }
        return configPath;
    }

    public static String getConfigBasePath(String name){
        String configPath = getBasePath() +  File.separator + "config" + File.separator + name;
        return configPath;
    }
}
